<?php if ($this->_var['my_address']): ?>
                <script type="text/javascript">
                //<![CDATA[
                $(function(){
                    //$("input[name='address_options']").click(set_address);
                    $('[addr_id]').click(function(){
                        var addr_id = $(this).attr('addr_id');
                        fill_address_form(addr_id);
                    });
                    //init
                    fill_address_form($('#more-addr .post-addr').eq(0).attr('addr_id'));
                });
                function fill_address_form(addr_id){
                    var addr_data = addresses[addr_id];
                    for(k in addr_data){
                        switch(k){
                            case 'consignee':
                            case 'address':
                            case 'zipcode':
                            case 'email':
                            case 'phone_tel':
                            case 'phone_mob':
                            case 'region_id':
                                $("input[name='" + k + "']").val(addr_data[k]);
                            break;
                            case 'region_name':
                                $("input[name='" + k + "']").val(addr_data[k]);
                            break;
                        }
                    }
                }
                //]]>
                </script>
<div class="show-addr mt10"> 
	<?php $_from = $this->_var['my_address']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'address');$this->_foreach['address_select'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['address_select']['total'] > 0):
    foreach ($_from AS $this->_var['address']):
        $this->_foreach['address_select']['iteration']++;
?>
	<div class="J_addr<?php echo $this->_var['address']['addr_id']; ?> <?php if (! ($this->_foreach['address_select']['iteration'] <= 1)): ?>hidden<?php endif; ?> post-addr">
		<article class="wrap">
			<ul>
				<li class="consignee">
					<div class="content-inline-list">
						<div class="content-title">收货信息：</div>
						<div class="content-detail"><?php echo htmlspecialchars($this->_var['address']['consignee']); ?> <?php if ($this->_var['address']['phone_mob']): ?><?php echo $this->_var['address']['phone_mob']; ?><?php else: ?><?php echo $this->_var['address']['phone_tel']; ?><?php endif; ?></div>
					</div>
				</li>
				<li class="address-content" >
					<div class="content-inline-list">
						<div class="content-title">收货地址：</div>
						<div class="content-detail"><span class="content-detail-addr"><?php echo htmlspecialchars($this->_var['address']['region_name']); ?>&nbsp;&nbsp;  <?php echo htmlspecialchars($this->_var['address']['address']); ?></span>
						<aside class="content-nav">&nbsp;</aside>
						</div>
					</div>
				</li>
			</ul>
		</article>
	</div>
	<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
	<input name="address_options" value="1" type="hidden"/>
	<input  name="consignee" type="hidden" value="" />
	<input  name="address" type="hidden" value="" />
	<input  name="zipcode" type="hidden" value="" />
	<input  name="email" type="hidden" value="" />
	<input  name="phone_tel" type="hidden" value="" />
	<input  name="phone_mob" type="hidden" value="" />
	<input  name="region_id" type="hidden" value="" />
	<input  name="region_name" type="hidden" value="" />
	<a  href="#more-addr"  id="J_other_addr" data-transition="slide"></a>
</div>
<?php endif; ?>